package com.dubbo.service.impl;

import com.dubbo.bean.User;
import com.dubbo.service.UserService;

import java.util.ArrayList;
import java.util.List;

public class UserServiceImpl implements UserService
{

    @Override
    public void sayHello(String name)
    {
        System.out.println("Hello " + name + "!");
    }

    public List<User> findList()
    {
        List<User> list = new ArrayList<>();

        User user = new User();
        user.setUsername("Mac");
        user.setAge(35);
        list.add(user);

        User user2 = new User();
        user2.setUsername("Leo");
        user2.setAge(20);
        list.add(user2);

        return list;
    }
}
